package com.example.chapter04;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.text.format.DateUtils;
import android.view.View;
import android.widget.TextView;

import com.example.chapter04.utils.DateUtil;

import org.w3c.dom.Text;

public class ActSendActivity extends AppCompatActivity implements View.OnClickListener{
    private TextView tv_sent;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_act_send);
        findViewById(R.id.btn_sent).setOnClickListener(this);
        tv_sent  = findViewById(R.id.tv_sent);
    }

    @Override
    public void onClick(View view) {
        Intent intent = new Intent(this,ActReceiveActivity.class);
        //创建一个新包裹
        Bundle bundle = new Bundle();
        bundle.putString("request_time", DateUtil.getNowTime());
        bundle.putString("request_content",tv_sent.getText().toString());

        startActivity(intent);

    }
}